﻿
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Demo.Models
{
    /// <summary>
    /// Class MultiImageText.
    /// </summary>
    [Description("图文消息")]
    public class ImageText :BaseEntity<long>
    {
        public ImageText()
        {
            ImageTextItems = new List<ImageTextItem>();
        }

        public long WeChat_Id { get; set; }
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }


        /// <summary>
        /// 该图文消息的MeidiaId
        /// </summary>
        /// <value>The media identifier.</value>
        public string MediaId { get; set; }
        /// <summary>
        /// 图文类型---但图文，多图文
        /// </summary>
        /// <value>The type.</value>
        public string Type { get; set; }

        /// <summary>
        /// 图文消息序列化结果
        /// </summary>
        /// <value>The content.</value>
        public string Content { get; set; }


        public virtual WeChat WeChat { get; set; }
      
        /// <summary>
        /// 因为单图文，多图文的消息内置结构一致，可用集合包含两种
        /// </summary>
        /// <value>The items.</value> 
        [JsonProperty("articles")]
        public virtual ICollection<ImageTextItem> ImageTextItems { get; set; }
    }
}
